package widgets;

import javax.swing.Action;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JButton;

@SuppressWarnings("serial")
public class GButton extends JButton {

	public GButton() {
		this(null, null);
	}

	public GButton(String text) {
		this(text, null);
	}
	
	public GButton(Icon icon) {
		this(null, icon);
	}

	public GButton(Action a) {
		this();
		setAction(a);
	}

	public GButton(String text, Icon icon) {
		super(text, icon);
		setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
		setContentAreaFilled(false);
		setFocusPainted(false);
	}
	
	public GButton(Icon icon, int border) {
		super(null, icon);
		setBorder(BorderFactory.createEmptyBorder(border, border, border, border));
		setContentAreaFilled(false);
		setFocusPainted(false);
	}

}